package com.brush.brushcommon.common.mq.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author cws
 * @since 2024-08-03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sys_mq_error")
@Schema(name = "MqError对象", description = "MQ错误记录表")
public class MqError {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private String id;


    @Schema(description = "请求参数")
    private  String requestParams;

    @Schema(description = "错误信息")
    private String errorMsg;



    @Schema(description = "处理人")
    private String handle_founder;


    @Schema(description = "备注")
    private String notes;

    @Schema(description = "是否已经处理 1 已处理")
    private Integer is_handle;

    /**
     * 创建时间
     * 自动填充
     */
    @Schema(hidden = true)
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtCreate;


}

